#!/bin/sh
setdate() {
  set $(date)
  d="${2#0}"; y="$4"; t="${5%:*}"; n="$6"
  case "$1" in
    Mon) dow="Monday"    ;;
    Tue) dow="Tuesday"   ;;
    Wed) dow="Wednesday" ;;
    Thu) dow="Thursday"  ;;
    Fri) dow="Friday"    ;;
    Sat) dow="Saturday"  ;;
    Sun) dow="Sunday"    ;;
  esac
  case "$3" in
    Jan) m="January"     ;;
    Feb) m="February"    ;;
    Mar) m="March"       ;;
    Apr) m="April"       ;;
    May) m="May"         ;;
    Jun) m="June"        ;;
    Jul) m="July"        ;;
    Aug) m="August"      ;;
    Sep) m="September"   ;;
    Oct) m="October"     ;;
    Nov) m="November"    ;;
    Dec) m="December"    ;;
  esac
  printf '%s %s, %d %s %s | %s %s %s' \
    "" "$dow" "$d" "$m" "$y" "" "$t" "$n"
}
